//
//  RuleRankingViewController.m
//  AndCampus
//
//  Created by 史宵宵 on 2018/2/6.
//  Copyright © 2018年 史宵宵. All rights reserved.
//

#import "RuleRankingViewController.h"

@interface RuleRankingViewController ()<UIScrollViewDelegate>
@property (nonatomic,weak) UIImageView *imageView;
@end

@implementation RuleRankingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"排行规则";
    
    [self creatDataList];
    
    UIScrollView *scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, kScreenW, kScreenH-64)];
    scrollView.pagingEnabled=YES;
    scrollView.backgroundColor=[UIColor whiteColor];
    scrollView.delegate=self;
    scrollView.contentSize=CGSizeMake(kScreenW, kScreenH);
    scrollView.showsHorizontalScrollIndicator = NO;
    scrollView.showsVerticalScrollIndicator = NO;
    [self.view addSubview:scrollView];
    
    UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, kScreenW, kScreenH)];
    self.imageView = imageView;
    [scrollView addSubview:imageView];
}
- (void)creatDataList{
    YJNetWorkManger *yjNetWorkManger =  [YJNetWorkManger shareManager];
    NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
    [dic setValue:[Global getUserTokenInfo] forKey:@"token"]; //用户的token
    [dic setValue:@"3" forKey:@"id"]; //1：查询朋友互动类型 2
    [yjNetWorkManger requestType:POST andURL:[JSPathUtil urlAppInterestGetImageById] andParmas:dic andComplition:^(id response, BOOL isuccess) {
        if (isuccess) {
            [self.imageView sd_setImageWithURL:[NSURL URLWithString:response[@"image"]] placeholderImage:KDETAILFAULT];
        }
    }];
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
